<?php

namespace app\index\model;

use think\Db;
use think\db\Query;
use think\Model;



class Base extends Model
{

     // 获取频道信息
    public function getchannels()
    {
        $data = db('Channel')
        ->field(['Name','id','desc','img'])
        ->order('id', 'asc')
        ->limit(7)
        ->select();
        return $data;
    }

    // 获取用户的基本信息
    public function getuser($id='')
    {
       $data = db('user')->find($id);
       return $data;
    }

      // 获取用户的头像信息
    public function getuserpic()
    {
        $data = db('Channel')->field(['Name','id'])->order('id', 'asc')->select();
        var_dump($data);
    }


}
